Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear modifier state when focus is lost #298

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

SludgePhD
Copy link
Contributor

This does the same thing bevy does for the ButtonInput<KeyCode> resource here: https://github.com/bevyengine/bevy/blob/d8d49fdd1393ab543a0ed66da9a255fda7d66572/crates/bevy_input/src/keyboard.rs#L151-L155

Fixes #232

I'm not sure why all the fields in InputEvents are public, since it makes this a breaking change and isn't required for things to compile.

@SludgePhD SludgePhD mentioned this pull request Jul 19, 2024
@vladbat00
Copy link
Owner

Awesome, thank you for the fix!

@vladbat00 vladbat00 merged commit 91c6b64 into vladbat00:main Jul 28, 2024
39 checks passed
@vladbat00
Copy link
Owner

Btw, the motivation for public fields was to allow people to re-use parts of bevy_egui logic if they want to re-implement some parts of input handling. Since we are on 0.x, I'm fine with breaking changes, as I usually publish a new version on Egui or Bevy release, which tends to introduce a lot of breaking changes anyway.

If we ever reach 1.0, the fields will become private. Or it might as well happen sooner, for example, after we merge #299 and provide some API for people to handle tricky input scenarios such as worldspace UI, etc.

Anyway, public fields of resources is something I'm open to reconsider.

@SludgePhD SludgePhD deleted the unstick-keys branch July 28, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sticky shift key
2 participants